/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.user.vo;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;

/**
 * 用户apiKey Redis缓存VO
 *
 * @since 2022-10-28 15:47:24
 */
@Data
public class UserApiKeyCacheVO implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

	/**
	 * 用户id
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long userId;

	/**
	 * 名称
	 */
	private String name;

	/**
	 * 访问密钥
	 */
	private String accessKey;

	/**
	 * 保密密钥，默认不能查询出来
	 */
	private String secretKey;

	/**
	 * 权限，以空格作为间隔
	 */
	private String permission;

	/**
	 * 是否限制ip（0否、1是）
	 */
	private String hasIpLimit;

	/**
	 * 状态（0正常、1封禁）
	 */
	private String status;
}
